﻿/*
 * PsTFS is a set of PowerShell commands to manage and use Team Foundation Server. PowerShell 
 * effectiveness is combined with the power of TFS API to maximizes TFS capabilities.
 * 
 * Creator : Choulant Noham
 * Mail : choulant@gmail.com
 * Blog : http://choulant.blogspot.com
 * 
 */

using System;
using System.ComponentModel;
using System.Management.Automation;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Configuration.Install;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.VersionControl.Client;
using System.IO;
using PowerShell.Host.PsTFS.CdmLet.PsObject;

namespace PowerShell.Host.PsTFS.CdmLet
{
    /// <summary>
    /// Extrait le projet dans un second répertoire
    /// </summary>
    [Cmdlet(VerbsCommon.Set, "Export")]
    public class Set_Export : Cmdlet
    {
        protected override void ProcessRecord()
        {
            try
            {
                WriteWarning("Not implemented");
            }
            catch (Exception ex)
            {
                ErrorRecord err = new ErrorRecord(ex, "<ID>", ErrorCategory.WriteError, null);
                WriteError(err);
                PsLog.AddLog(null, ex.StackTrace);
            }
            finally
            {
                
            } 

        }
        protected override void EndProcessing()
        {
            PsLog.AddLog("Set-Export is end");
            base.EndProcessing();
        }

        [Parameter(Position = 0, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public TeamFoundationServer TFS { get; set; }

        [Parameter(Position = 1, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public string ProjectName { get; set; }

        [Parameter(Position = 2, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public string Source { get; set; }

        [Parameter(Position = 3, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public string Target { get; set; }

        [Parameter(Position = 4, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public string Description { get; set; }

        [Parameter(Position = 5, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public RecursionType RecursionType { get; set; }

        [Parameter(Position = 6, Mandatory = true)]
        [ValidateNotNullOrEmpty]
        public MergeOptions MergeOptions { get; set; }
    }
}
